package com.oa.server.util;


import com.oa.server.entity.Admin;
import org.springframework.security.core.context.SecurityContextHolder;

public class AdminUtils {
    // 获取当前管理员id
    public static Admin getCurrentAdmin(){
        return (Admin) SecurityContextHolder.getContext().getAuthentication().getPrincipal();
    }
}
